<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../common/tagInclude.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<base href="${basePath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK href="${basePath}styleAdmin/css/portalinabox.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="${basePath}styleAdmin/js/prototype-1.6.0.3.js"></script>
<script type="text/javascript" src="${basePath}styleAdmin/js/common.js"></script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>新建角色</title>
<script type="text/javascript">
	function checkForm(){
		var errors = "" ;
		if($F('roleName') == "" ){
			errors += "角色名称不能为空<br/>" ;
		}
		if(isChecked("rightValue") == false ){
			errors += "权限至少选择一个<br/>" ;
		}
		if(errors.length > 0){
			$('errors').innerHTML = "<font color='red' size='12'>" + errors  + "</font>" ;
			return ;
		} 
		document.myform.submit();
	}
</script>
</head>
<body bottomMargin="0" leftMargin="0" rightMargin="0" topmargin="0">
<form name="myform" method="post" action="${basePath}admin/role/${act}">
<%@include file="../common/navigate.jsp" %>
<input type="hidden" id="roleId" name="roleId" value="${roleInfo.roleId}"/>
<table width="90%" border="0" align="center" cellPadding="0" cellSpacing="0" style="margin-top:5px;">
 <tr><td align="center" colspan="2"><div id="errors"></div></td></tr>
 <tr>
	<td vAlign="top" align="center" height="157">
		<table width="10" border="1" class="mainFunctionTable"  cellpadding="0" cellspacing="1">
        	<tr height="25" class="pLabel">
            	<td colspan="2" class="td_nwarpstyle" align="left">&nbsp;&nbsp;<c:choose><c:when test="${act == 'update'}">更新</c:when><c:otherwise>新建</c:otherwise></c:choose>角色</td>
            </tr>
			<tr>
         		<td align="center" width="10%">角色名称</td>
         		<td align="left"><input type="text" name="roleName" id="roleName" value="${roleInfo.roleName}" size="80"/>&nbsp;&nbsp;<font color='red'>*</font></td>
    		 </tr>
			<tr>
         		<td align="center" width="10%">角色描述</td>
         		<td align="left">
					<textarea rows="10" cols="80" name="roleDesc" id="roleDesc">${roleInfo.roleDesc}</textarea>
				</td>
    		 </tr>
			 <tr>
         		<td align="center" width="10%">权限管理</td>
         		<td align="left">
				<a href="javascript:checkAll('rightValue',true);">全选</a>&nbsp;&nbsp;<a href="javascript:checkAll('rightValue',false);">取消</a>&nbsp;&nbsp;<font color='red'>至少选择一项</font>
				<table width=100% border=0 class="mainFunctionTable"  cellpadding="0" cellspacing="1" id="table_channel">
					<tr height=25 class="pLabel" align="center">
						<td align="left"><br/>栏目管理</td>
					</tr>
					<tr>
						<td>
							<input type="checkbox" name="rightValue" id="rightValue" value="1010" <c:if test="${fmtString:isContainsInList('1010',roleRights)}">checked</c:if>>添加栏目&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="1020" <c:if test="${fmtString:isContainsInList('1020',roleRights)}">checked</c:if>>管理栏目&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="1030" <c:if test="${fmtString:isContainsInList('1030',roleRights)}">checked</c:if>>TAG关键字标签&nbsp;&nbsp;
							
						</td>
					</tr>
					<tr height=25 class="pLabel" align="center">
						<td align="left"><br/>文章内容管理</td>
					</tr>
					<tr>
						<td>
							<table>
							<!-- 
								<tr>
									<td width="15%">业务概况管理(业务描述)</td>
									<td>
									<input type="checkbox" name="rightValue" id="rightValue" value="2010" <%//=ris.contains("2010") ? "checked" :"" %>>业务描述管理
									</td>
								</tr>
							 -->								
								<tr>
									<td width="30%">${enNews}</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="3011" <c:if test="${fmtString:isContainsInList('3011',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="3012" <c:if test="${fmtString:isContainsInList('3012',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="3013" <c:if test="${fmtString:isContainsInList('3013',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="3014" <c:if test="${fmtString:isContainsInList('3014',roleRights)}">checked</c:if>>&nbsp;查看
										<input type="checkbox" name="rightValue" id="rightValue" value="3015" <c:if test="${fmtString:isContainsInList('3015',roleRights)}">checked</c:if>>&nbsp;同步
									</td>
								</tr>
								<tr>
									<td>${enDevelopment}</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="3021" <c:if test="${fmtString:isContainsInList('3021',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="3022" <c:if test="${fmtString:isContainsInList('3022',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="3023" <c:if test="${fmtString:isContainsInList('3023',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="3024" <c:if test="${fmtString:isContainsInList('3024',roleRights)}">checked</c:if>>&nbsp;查看
									</td>
								</tr>
								<tr>
									<td>${enStory}</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="3031" <c:if test="${fmtString:isContainsInList('3031',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="3032" <c:if test="${fmtString:isContainsInList('3032',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="3033" <c:if test="${fmtString:isContainsInList('3033',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="3034" <c:if test="${fmtString:isContainsInList('3034',roleRights)}">checked</c:if>>&nbsp;查看
									</td>
								</tr>
								<tr>
									<td>${enJoinus}</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="3041" <c:if test="${fmtString:isContainsInList('3041',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="3042" <c:if test="${fmtString:isContainsInList('3042',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="3043" <c:if test="${fmtString:isContainsInList('3043',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="3044" <c:if test="${fmtString:isContainsInList('3044',roleRights)}">checked</c:if>>&nbsp;查看
									</td>
								</tr>
								<tr>
									<td>${enAboutCHC}</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="3051" <c:if test="${fmtString:isContainsInList('3051',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="3052" <c:if test="${fmtString:isContainsInList('3052',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="3053" <c:if test="${fmtString:isContainsInList('3053',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="3054" <c:if test="${fmtString:isContainsInList('3054',roleRights)}">checked</c:if>>&nbsp;查看
									</td>
								</tr>
								<tr>
									<td>${enAboutCertificateAndReputation}</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="3061" <c:if test="${fmtString:isContainsInList('3061',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="3062" <c:if test="${fmtString:isContainsInList('3062',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="3063" <c:if test="${fmtString:isContainsInList('3063',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="3064" <c:if test="${fmtString:isContainsInList('3064',roleRights)}">checked</c:if>>&nbsp;查看
									</td>
								</tr>
								<tr>
									<td>文章属性操作</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="4010" <c:if test="${fmtString:isContainsInList('4010',roleRights)}">checked</c:if>>&nbsp;置顶
										<input type="checkbox" name="rightValue" id="rightValue" value="4020" <c:if test="${fmtString:isContainsInList('4020',roleRights)}">checked</c:if>>&nbsp;首页显示
										<input type="checkbox" name="rightValue" id="rightValue" value="4040" <c:if test="${fmtString:isContainsInList('4040',roleRights)}">checked</c:if>>&nbsp;列表页显示
										<input type="checkbox" name="rightValue" id="rightValue" value="4030" <c:if test="${fmtString:isContainsInList('4030',roleRights)}">checked</c:if>>&nbsp;文章审核
									</td>
								</tr>
								<tr>
									<td>回收站</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="5010" <c:if test="${fmtString:isContainsInList('5010',roleRights)}">checked</c:if>>&nbsp;管理
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr height=25 class="pLabel" align="center">
						<td align="left"><br/>六大业务概况</td>
					</tr>
					<tr>
						<td>
							<table>
								<tr>
									<td width="30%">${enBusinessHeavyMachinery }</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="6011" <c:if test="${fmtString:isContainsInList('6011',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="6012" <c:if test="${fmtString:isContainsInList('6012',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="6013" <c:if test="${fmtString:isContainsInList('6013',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="6014" <c:if test="${fmtString:isContainsInList('6014',roleRights)}">checked</c:if>>&nbsp;查看
									</td>
								</tr>
								<tr>
									<td>${enBusinessEnvironmentalProtectionWaterTreatment }</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="6021" <c:if test="${fmtString:isContainsInList('6021',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="6022" <c:if test="${fmtString:isContainsInList('6022',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="6023" <c:if test="${fmtString:isContainsInList('6022',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="6024" <c:if test="${fmtString:isContainsInList('6024',roleRights)}">checked</c:if>>&nbsp;查看
									</td>
								</tr>
								<tr>
									<td>${enBusinessEPCService }</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="6031" <c:if test="${fmtString:isContainsInList('6031',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="6032" <c:if test="${fmtString:isContainsInList('6032',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="6033" <c:if test="${fmtString:isContainsInList('6033',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="6034" <c:if test="${fmtString:isContainsInList('6034',roleRights)}">checked</c:if>>&nbsp;查看
									</td>
								</tr>
								<tr>
									<td>${enBusinessNewEnergyTechnology }</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="6041" <c:if test="${fmtString:isContainsInList('6041',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="6042" <c:if test="${fmtString:isContainsInList('6042',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="6043" <c:if test="${fmtString:isContainsInList('6043',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="6044" <c:if test="${fmtString:isContainsInList('6044',roleRights)}">checked</c:if>>&nbsp;查看
									</td>
								</tr>
								<tr>
									<td>${enBusinessEnergyTechnologyResearchService }</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="6051" <c:if test="${fmtString:isContainsInList('6051',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="6052" <c:if test="${fmtString:isContainsInList('6052',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="6053" <c:if test="${fmtString:isContainsInList('6053',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="6054" <c:if test="${fmtString:isContainsInList('6054',roleRights)}">checked</c:if>>&nbsp;查看
									</td>
								</tr>
								<tr>
									<td>${enBusinessInternationalTrade }</td>
									<td>
										<input type="checkbox" name="rightValue" id="rightValue" value="6061" <c:if test="${fmtString:isContainsInList('6061',roleRights)}">checked</c:if>>&nbsp;录入
										<input type="checkbox" name="rightValue" id="rightValue" value="6062" <c:if test="${fmtString:isContainsInList('6062',roleRights)}">checked</c:if>>&nbsp;删除
										<input type="checkbox" name="rightValue" id="rightValue" value="6063" <c:if test="${fmtString:isContainsInList('6063',roleRights)}">checked</c:if>>&nbsp;修改
										<input type="checkbox" name="rightValue" id="rightValue" value="6064" <c:if test="${fmtString:isContainsInList('6064',roleRights)}">checked</c:if>>&nbsp;查看
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr height=25 class="pLabel" align="center">
						<td align="left"><br/>前台页面内容管理</td>
					</tr>
					<tr>
						<td>
							<input type="checkbox" name="rightValue" id="rightValue" value="7010" <c:if test="${fmtString:isContainsInList('7010',roleRights)}">checked</c:if>>联系方式管理&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="7020" <c:if test="${fmtString:isContainsInList('7020',roleRights)}">checked</c:if>>添加栏目Flash&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="7030" <c:if test="${fmtString:isContainsInList('7030',roleRights)}">checked</c:if>>管理栏目Flash&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="7040" <c:if test="${fmtString:isContainsInList('7040',roleRights)}">checked</c:if>>页面头部链接管理&nbsp;&nbsp;
						</td>
					</tr>
					<tr height=25 class="pLabel" align="center">
						<td align="left"><br/>站外消息管理</td>
					</tr>
					<tr>
						<td>
							<input type="checkbox" name="rightValue" id="rightValue" value="8010" <c:if test="${fmtString:isContainsInList('8010',roleRights)}">checked</c:if>>分站信息&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="8020" <c:if test="${fmtString:isContainsInList('8020',roleRights)}">checked</c:if>>新增消息&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="8030" <c:if test="${fmtString:isContainsInList('8030',roleRights)}">checked</c:if>>消息列表&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="8040" <c:if test="${fmtString:isContainsInList('8040',roleRights)}">checked</c:if>>消息同步列表&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="8050" <c:if test="${fmtString:isContainsInList('8050',roleRights)}">checked</c:if>>消息同步统计&nbsp;&nbsp;
						</td>
					</tr>
					<tr height=25 class="pLabel" align="left">
						<td align="left"><br/>系统用户管理</td>
					</tr>
					<tr>
						<td>
							<input type="checkbox" name="rightValue" id="rightValue" value="9010" checked />个人信息管理&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="9020" <c:if test="${fmtString:isContainsInList('9020',roleRights)}">checked</c:if>>添加角色&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="9030" <c:if test="${fmtString:isContainsInList('9030',roleRights)}">checked</c:if>>角色管理&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="9040" <c:if test="${fmtString:isContainsInList('9040',roleRights)}">checked</c:if>>添加用户&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="9050" <c:if test="${fmtString:isContainsInList('9050',roleRights)}">checked</c:if>>用户管理&nbsp;&nbsp;
						</td>
					</tr>
					<tr height=25 class="pLabel" align="left">
						<td align="left"><br/>后台统计</td>
					</tr>
					<tr>
						<td>
							<input type="checkbox" name="rightValue" id="rightValue" value="10010" <c:if test="${fmtString:isContainsInList('10010',roleRights)}">checked</c:if>>操作统计&nbsp;&nbsp;
						</td>
					</tr>
					<tr height=25 class="pLabel" align="left">
						<td align="left"><br/>系统属性设置</td>
					</tr>
					<tr>
						<td>
							<input type="checkbox" name="rightValue" id="rightValue" value="11010" <c:if test="${fmtString:isContainsInList('11010',roleRights)}">checked</c:if>>web应用信息&nbsp;&nbsp;
							<input type="checkbox" name="rightValue" id="rightValue" value="11020" <c:if test="${fmtString:isContainsInList('11020',roleRights)}">checked</c:if>>数据库管理&nbsp;&nbsp;
						</td>
					</tr>
				</table>
				</td>
    		</tr>
            <tr align="left">
              <td align="center" colspan="2">
	              <a href="javascript:checkForm();"><img src="${basePath}styleAdmin/images/button/save.gif" border=0></a>
	              &nbsp;&nbsp;
	             	<c:if test="${fmtString:isContainsInList('9030',userRightsSession) }">
	             		<a href="${basePath}admin/role/list"><img src="${basePath}styleAdmin/images/button/exit.gif" border=0></a>
	             	</c:if>
              </td>
            </tr>
          </table>
      </td>
  </tr>
</table>
</form>
</body>
</html>